# demo04_set.py
s1 = {"刘能", "赵四", "⽪⻓⼭"}
s2 = {"刘科⻓", "冯乡⻓", "⽪⻓⼭"}
print(s1 | s2, s1 & s2, s1 - s2, s2 - s1)
list01 = [1, 1, 2, 2, 3, 3]
print(list(set(list01)))  # [1, 2, 3]


set01 = {5, 1.23, "hehe", True, (1, 2), 5}
print(set01, type(set01), len(set01))  # 5
print(5 in set01, "haha" not in set01)
for item in set01:  # str list tuple dict set range
    print("item:", item)
set01.add("xixi")  # 添加
set01.remove(5)    # 删除
print(set01)
